<template>
  <div>
    <!-- 面包屑导航区 -->
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>招聘招聘审核</el-breadcrumb-item>
      <el-breadcrumb-item>招聘列表</el-breadcrumb-item>
    </el-breadcrumb>

    <!-- 卡片视图区 -->
    <el-card>
      <!-- 用户列表区 -->
      <el-table border stripe :data="recruitsendlist">
        <el-table-column type="index"></el-table-column>
        <el-table-column label="岗位" prop="jod"></el-table-column>
        <el-table-column label="岗位要求" prop="jodRequire"></el-table-column>
        <el-table-column label="城市" prop="city"></el-table-column>
        <el-table-column label="薪资" prop="salary"></el-table-column>
        <el-table-column label="招聘负责人" prop="chargeMan"></el-table-column>
        <el-table-column label="联系电话" prop="phone"></el-table-column>
        <el-table-column label="审核结果" prop="audit"></el-table-column>
        <el-table-column label="操作" width="180px">
          <template slot-scope="scope">
            <el-button type="info" icon="el-icon-share" size="mini"></el-button>
            <el-button
              type="primary"
              icon="el-icon-edit"
              size="mini"
              @click="showEditDialog(scope.row.id)"
            ></el-button>
            <el-button
              type="danger"
              icon="el-icon-delete"
              size="mini"
              @click="removeUserById(scope.row.id)"
            ></el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      //招聘信息发布审核列表
      recruitsendlist: [],
    };
  },
  created() {
    if (sessionStorage.getItem("usermeg")) {
      let usermeg = JSON.parse(sessionStorage.getItem("usermeg"));
      this.$store.commit("setUserdata", usermeg);
      console.log("2", usermeg);
    }
    this.recruitSendAuditList();
  },
  methods: {
    async recruitSendAuditList() {
      const { data: res } = await this.$http.get(`Enterprise/RecruitmentList`);
      if (res.code !== 2002) {
        return this.$message.error("获取招聘发布数据审核列表失败！");
      } else {
        this.recruitsendlist = res.objData;
      }
    },
  },
};
</script>

<style lang="less" scoped>
.el-card {
  margin-top: 20px;
}
.el-table {
  margin-top: 10px;
}
</style>